<template>
  <div>
    <div class="outshop_body" v-for="outshop in outshopdata" :key="outshop.outid">

        <el-descriptions :column="3" border>
          <el-descriptions-item>
                <template slot="label">
                  <i class="el-icon-user-solid"></i>
                    出库人姓名
                </template>
                  {{outshop.outusname}}
          </el-descriptions-item>
          <el-descriptions-item>
                <template slot="label">
                  <i class="el-icon-postcard"></i>
                    身份证号
                </template>
                  {{outshop.outidcard}}
          </el-descriptions-item>
          <el-descriptions-item>
                <template slot="label">
                  <i class="el-icon-time"></i>
                    出库时间
                </template>
                  {{outshop.outaddtime|dateFormat}}
          </el-descriptions-item>
          <el-descriptions-item>
                <template slot="label">
                  <i class="el-icon-sold-out"></i>
                    出库商品
                </template>
                  {{outshop.shop.shopname}}
          </el-descriptions-item>
          <el-descriptions-item>
                <template slot="label">
                  <i class="el-icon-coin"></i>
                    出库数量
                </template>
                  {{outshop.outnum}}
          </el-descriptions-item>
          <el-descriptions-item>
                <template slot="label">
                  <i class="el-icon-user"></i>
                    操作人
                </template>
                  {{outshop.user.usname}}
          </el-descriptions-item>
        </el-descriptions>
        <br>
    </div>
  </div>
</template>

<script>
  export default {
    props:{
      outshopdata: {
        type: Array,
        required: true
      }
    },
    filters:{
      dateFormat(value){
         let sDate = value.substr(0,10);
             let sTime = value.substr(11,8);
             value = sDate + " " + sTime;
             return value;
        }
    }
  }
</script>

<style>
  .el-descriptions-item__cell{
    width: 16%;
  }
</style>
